<!DOCTYPE html>
<html>

@include("../head.html"){}

<body>
<div class="container">
    @include("../menu.html"){}
</div>

<div class="content-body">
    <div class="container">
        <div class="row">
            <main class="col-md-8">

                @if(result.total==0){


                @}else{

                @for(post in result.data){

                <article class="post post-${postLP.index}">
                    <header class="entry-header">
                        <h1 class="entry-title">
                            <a href="${basePath}post/${post.id}">${post.title}</a>
                        </h1>

                        <div class="entry-meta">
                            <span class="post-category">
                                <a href="${basePath}post/category/${post.category.slug}">${post.category.name}</a>
                            </span>

                            <span class="post-date">
                                <a href="${basePath}post/date/${post.postDate,'yyyy'}/${post.postDate,'MM'}">
                                    <time class="entry-date" datetime="${post.postDate,'yyyy年MM月dd日'}">${post.postDate,"yyyy年MM月dd日"}</time>
                                </a>
                            </span>

                            <span class="post-author">
                                <a href="${basePath}post/user/${post.user.id}">${post.user.nickname}</a>
                            </span>

                            <!--<span class="comments-link">-->
                            <!--<a href="${basePath}post/${post.id}">${post.commentCount} 评论</a>-->
                            <!--</span>-->
                        </div>
                    </header>
                    <div class="entry-content clearfix">
                        <p>${post.excerpt}</p>

                        <div class="read-more cl-effect-14">
                            <a href="${basePath}post/${post.id}" class="more-link">阅读全文 <span class="meta-nav">→</span></a>
                        </div>
                    </div>
                </article>

                @}
                @}


            </main>

            @include("../right.html"){}
        </div>

        <div class="row">
            <div class="col-lg-8 entry">
                <nav class="text-center">
                    <ul class="pagination">
                        <li>
                            <a href="?page=1" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>

                        @for(var i=1;i<=result.pageCount;++i){
                        <li>
                            <a href="?page=${i}">${i}</a>
                        </li>
                        @}
                        <li>
                            <a href="?page=${result.pageCount}" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</div>
@include("../foot.html"){}

@include("../mobileMenu.html"){}

@include("../base.html"){}

</body>
</html>
